<%@ page language="java" import="java.util.*,com.hs.core.cache.*,com.hs.dnms.action.statics.*,com.hs.dnms.model.*" pageEncoding="utf-8"%>
 <%
  List  tablist = (List)request.getAttribute("tabdata"); 
  Set  sortlist = (Set)request.getAttribute("sortdata");  
  String  imgdata = (String)request.getAttribute("imgdata");  
  String  yeardata = (String)request.getAttribute("yearstr");  
  String  startyear = (String)request.getAttribute("startyear"); 
  String  endyear = (String)request.getAttribute("endyear"); 
    String  allinfo = (String)request.getAttribute("allinfo");  
   
  
  %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ include file="../../include.jsp"%> 
<script language="javascript" type="text/javascript" src="<%=path %>/thirtpart/My97DatePicker/WdatePicker.js"></script>
  
<script language="javascript" type="text/javascript" src="<%=path %>/thirtpart/highcharts216/highcharts.js"></script>
<script language="javascript" type="text/javascript" src="<%=path %>/thirtpart/highcharts216/modules/exporting.js"></script>
<script language="javascript" type="text/javascript">
   function staticDetail(detailname,countsql){
 	var pageURL = "<%=basePath%>static/staticdetail.do?countsql="+encodeURIComponent(countsql) + "&detailname="  + encodeURIComponent(detailname); 
	openwindow(pageURL,'1000','800',''); 
 }
</script>
</head>
<body>
<form name="searchform" action="<%=basePath %>statics/pointstat.do" method=post>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="deta_list_sear">
      <tr>
        <td width="15%">
          起始年份：
        </td>
        <td width="20%">
           <input type="text" class="Wdate" id="startyear" value="<%=startyear==null?"":startyear %>" style="width:100%;vertical-align:middle" name="startyear"  onFocus="WdatePicker({el:'startyear',dateFmt:'yyyy'})"  />
        </td>  
        <td width="15%">
          结束年份：
        </td>
         <td width="20%">
           <input type="text" class="Wdate" id="endyear" value="<%=endyear==null?"":endyear %>" style="width:100%;vertical-align:middle" name="endyear"  onFocus="WdatePicker({el:'endyear',dateFmt:'yyyy'})"  />
         </td>
         <td width="10%" align="left">
            <input  type="submit" value="统计" class="but_2"/>
        </td>
        <td width="20%" align="left">
            &nbsp;
        </td>
        </tr>
    </table>
</form>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="list">
<tr style="height:100%">
<td> 
	<table border="0" cellspacing="0" cellpadding="0" class="list" > 
      <tr>
        <th width="10%">序号</th>  
        <th width="50%">穴位名称</th>
        <th width="40%">期刊文章数</th> 
      </tr>   
       <%if(sortlist != null && sortlist.size()>0){
            Iterator iter = sortlist.iterator();  
            int i = 0;
      		while(iter.hasNext()){ 
      			StaObj data = (StaObj)iter.next(); 
      			String yearStr = data.getNameStr();
      			String yearcount = data.getCountall();
      			i++; 
      %> 
      <tr>
        <td align="center"><%= i %></td> 
        <td><%=yearStr %></td>
        <td><a href="javaScript:staticDetail('<%=yearStr %>','<%=data.getCountsql() %>')"><%=yearcount%></a></td> 
       </tr>  
      <%}}else{ %>
      <tr>
        <td align="center" colspan="3"><font color="red">没有数据</font></td>
      </tr>
      <%} %>
    </table>
    </td> 
    </tr>
    <tr>
    <td >
    	<div id="container" class="highcharts-container" style="height:100%; margin: 0 2em; clear:both; min-width: 300px"></div>
    
    </td>
 </tr>  
 </table>
</body>
</html>
<script language="javascript" type="text/javascript">


var chart;
$(document).ready(function() {
   chart = new Highcharts.Chart({
      chart: {
         renderTo: 'container',
         defaultSeriesType: 'line'
      },
      title: {
         text: '<strong><font color=red size=3>中医治疗多囊卵巢综合征排名前十的穴位数量历年趋势统计图</font></strong>'
      },
      subtitle: {
         text: '<strong><%=allinfo%></strong>'
      },
      xAxis: {
         categories: <%=yeardata%>
      },
      yAxis: {
         title: {
            text: '<strong>文献数量（篇）</strong>'
         }
      },
      tooltip: {
         enabled: false,
         formatter: function() {
            return '&lt;b&gt;'+ this.series.name +'&lt;/b&gt;&lt;br/&gt;'+
               this.x +': '+ this.y +'&Acirc;&deg;C';
         }
      },
      plotOptions: {
         line: {
            dataLabels: {
               enabled: true
            },
            enableMouseTracking: false
         }
      },
      exporting: {
		
		filename: "chart",
		
		type: "image/png",
		
		url: '<%=basePath%>image/export.do',
		
		width: 800
		
		},
      series: [<%=imgdata%>]
   });
   
   
});
</script>
